{% extends "admin/base.html" %}

{% if request.cookies.get('Scr1wCTFdLanguage') == 'en' %}
{% set en = true %}
{% else %}
{% set en = false %}
{% endif %}

{% block stylesheets %}

{% endblock %}

{% block content %}
<div class="jumbotron">
	<div class="container">
		<h1><b>{{"CTFd Owl Configuration" if en else "CTFd Owl 插件设置"}}</b></h1>
	</div>
</div>
<div class="container">
	<div class="row">
		<div class="col-md-3">
			<ul class="nav nav-pills flex-column">
				<li class="nav-item">
					<a class="nav-link rounded-0 active" href="#docker" role="tab" data-toggle="tab">{{"Docker Settings" if en else "容器设置"}}</a>
				</li>
				<li class="nav-item">
					<a class="nav-link rounded-0" href="#frp" role="tab" data-toggle="tab">{{"FRP Settings" if en else "Frp设置"}}</a>
				</li>
				<li class="nav-item">
					<a class="nav-link rounded-0" href="/plugins/ctfd-owl/admin/containers">🔗{{"Instances" if en else "实例列表"}}</a>
				</li>
                <li class="nav-item">
                    <a class="nav-link rounded-0" href="/plugins/ctfd-owl/admin/upload">🔗{{"Upload" if en else "上传题目"}}</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link rounded-0" href="/plugins/ctfd-owl/admin/sources">🔗{{"Sources" if en else "源码列表"}}</a>
                </li>
			</ul>
		</div>
		<div class="col-md-9">
			{% for error in errors %}
				<div class="alert alert-danger alert-dismissable" role="alert">
					<span class="sr-only">Error:</span>
					{{ error }}
					<button type="button" class="close" data-dismiss="alert" aria-label="Close">
						<span aria-hidden="true">×</span>
					</button>
				</div>
			{% endfor %}

			<div class="tab-content">
				{% include "configs/docker_settings.html" %}
				{% include "configs/frp_settings.html" %}
			</div>
		</div>
	</div>
</div>
{% endblock %}

{% block scripts %}
  <script defer src="{{ url_for('plugins.ctfd-owl.assets', path='configs.js') }}"></script>
{% endblock %}
